#include <glib.h>
#include <stdio.h>

int main(){
	GString *buf = g_string_new("");
	GIOChannel *gio = g_io_channel_new_file ("justin.txt", "r", NULL);
	GHashTable *hist = g_hash_table_new(g_str_hash, g_str_equal);
	
	while(g_io_channel_read_line_string(gio, buf, NULL, NULL) != G_IO_STATUS_EOF){
		int i =0;
		g_print("%s\n", buf->str);
		gchar **line = g_strsplit(buf->str, " ", 0);
		while(line[i]!='\0'){
			g_print("%s\n",line[i]);
			i ++;
		}
		g_strfreev(line);
		printf("%d\n", i);
	}
	return 0;
}